.chat-history-toggle {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid #333;
  background: #1a1a1a;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.2s;
  flex-shrink: 0;
}

.chat-history-toggle:hover {
  background: #252525;
  border-color: #555;
}

.chat-history-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
}

.chat-history-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 300px;
  height: 100vh;
  background: #1a1a1a;
  border-right: 1px solid #2a2a2a;
  z-index: 100;
  display: flex;
  flex-direction: column;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

.chat-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid #2a2a2a;
}

.chat-history-header h2 {
  margin: 0;
  font-size: 18px;
  color: #fff;
}

.chat-history-close {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #888;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.2s;
}

.chat-history-close:hover {
  background: #252525;
  color: #fff;
}

.chat-history-new {
  margin: 16px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #4a9eff;
  background: #4a9eff;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.chat-history-new:hover {
  background: #3a8eef;
  border-color: #3a8eef;
}

.chat-history-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.chat-history-empty {
  padding: 32px 16px;
  text-align: center;
  color: #666;
  font-size: 14px;
}

.chat-history-item {
  position: relative;
  padding: 12px;
  margin-bottom: 8px;
  border-radius: 8px;
  background: #252525;
  cursor: pointer;
  transition: all 0.2s;
}

.chat-history-item:hover {
  background: #2a2a2a;
}

.chat-history-item.active {
  background: #2a3a4a;
  border: 1px solid #4a9eff;
}

.chat-history-item-title {
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-history-item-meta {
  font-size: 12px;
  color: #666;
  display: flex;
  gap: 4px;
  align-items: center;
}

.chat-history-item-delete {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: #666;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all 0.2s;
}

.chat-history-item:hover .chat-history-item-delete {
  display: flex;
}

.chat-history-item-delete:hover {
  background: #3a3a3a;
  color: #fff;
}

